<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <h:head>
        <title>İhale Yönetim Sistemi</title>
        <link href="../style.css" rel="stylesheet" type="text/css"></link>
        <div style="text-align: center;height:139px;background-color: #2D99FF"></div>

    </h:head>
    <h:body>

        <div id="wrapper">
            <div id="logo">

            </div>
            <div id="header">
                <!-- 		<div id="menu">
                
                        </div>    -->
            </div>
            <div class="page">
                <div id="page-bgtop">

                    <div id="dummy"></div>
                    <p:panel id="panelsidebar" header="Menu">
                        <ui:include src="MenuAdmin.xhtml"/>

                    </p:panel>


                    <!-- end #sidebar -->
                    <h:form prependId="false">
                        <div id="content">
                            <p:panel id="eklemepaneli" header="Satın Almacı Güncelleme Sayfası">

                                <p:dataTable id="satinalmaci" var="satinalmaci" value="#{satinalmacibean.satinAlmaciListesi}" paginator="true" rows="10"
                                             selection="#{satinalmacibean.secilenSatinalmaci}" selectionMode="single"
                                             onRowSelectUpdate="satinalmaciGüncelle" onRowSelectComplete="satinalmaciGuncelle.show()" >

                                    <f:facet name="header">  
                                        <p:outputPanel>  
                                            <h:outputText value="Satın Almacı Listesi:" />  

                                        </p:outputPanel>  
                                    </f:facet>  

                                    <p:column sortBy="#{satinalmaci.id}" filterBy="#{satinalmaci.id}" style="width:16px">
                                        <f:facet name="header">
                                            <h:outputText value="Id" />
                                        </f:facet>
                                        <h:outputText value="#{satinalmaci.id}" />
                                    </p:column>
                                    <p:column sortBy="#{satinalmaci.sirketAdi}" filterBy="#{satinalmaci.sirketAdi}" style="width:16px">
                                        <f:facet name="header">
                                            <h:outputText value="Şirket" />
                                        </f:facet>
                                        <h:outputText value="#{satinalmaci.sirketAdi}" />
                                    </p:column>
                                    <p:column sortBy="#{satinalmaci.ilgiliKisi}" filterBy="#{satinalmaci.ilgiliKisi}" style="width:16px">
                                        <f:facet name="header">
                                            <h:outputText value="İlgili Kişi" />
                                        </f:facet>
                                        <h:outputText value="#{satinalmaci.ilgiliKisi}" />
                                    </p:column>

                                    <p:column sortBy="#{satinalmaci.webSite}" filterBy="#{satinalmaci.webSite}" style="width:16px">
                                        <f:facet name="header">
                                            <h:outputText value="Web Sitesi" />
                                        </f:facet>
                                        <h:outputText value="#{satinalmaci.webSite}" />
                                    </p:column>
                                    <p:column sortBy="#{satinalmaci.kullaniciAdi}" filterBy="#{satinalmaci.kullaniciAdi}" style="width:16px">
                                        <f:facet name="header">
                                            <h:outputText value="Kullanıcı Adı" />
                                        </f:facet>
                                        <h:outputText value="#{satinalmaci.kullaniciAdi}" />
                                    </p:column>


                                </p:dataTable>  

                            </p:panel> 


                            <p:dialog header="Satın Almacı Düzenle" widgetVar="satinalmaciGuncelle" resizable="false"  
                                      width="600" height="350" showEffect="blind"  hideEffect="blind">  

                                <h:panelGrid id="satinalmaciGüncelle" columns="2" cellpadding="4">  

                                    <h:outputText value="Şirket Adı: "></h:outputText> <h:inputText value = "#{satinalmacibean.secilenSatinalmaci.sirketAdi}" ></h:inputText>                                      
                                    <h:outputText value="Web Adresi: "></h:outputText> <h:inputText value = "#{satinalmacibean.secilenSatinalmaci.webSite}" ></h:inputText>                                      
                                    <h:outputText value="Adres-Tel: "></h:outputText> <h:inputText value = "#{satinalmacibean.secilenSatinalmaci.adres}" ></h:inputText>                                      
                                    <h:outputText value="İlgili Kişi: "></h:outputText> <h:inputText value = "#{satinalmacibean.secilenSatinalmaci.ilgiliKisi}" ></h:inputText>                                      
                                    <h:outputText value="#{satinalmacibean.foo}" />
                                    <p:dataTable id="tedarikcilistesi" var="tedarikcilistesi" value="#{satinalmacibean.secilenSatinalmaci.tedarikciler}" paginator="true" rows="10"
                                                 selection="#{satinalmacibean.tedarikci}" emptyMessage="Satın almacıya atanmış tedarikçi bulunmuyor!">

                                        <f:facet name="header">  
                                            <p:outputPanel>  
                                                <h:outputText value="Tedarikçi Listesi:" />  

                                            </p:outputPanel>  
                                        </f:facet>  

                                        <p:column style="width:16px">
                                            <f:facet name="header">
                                                <h:outputText value="Şirket Adı" />
                                            </f:facet>
                                            <h:outputText value="#{tedarikcilistesi.sirketAdi}" />
                                        </p:column>

                                        <p:column style="width:16px">
                                            <f:facet name="header">
                                                <h:outputText value="Web sitesi" />
                                            </f:facet>
                                            <h:outputText value="#{tedarikcilistesi.webSite}" />
                                        </p:column>

                                        <p:column style="width:16px">
                                            <f:facet name="header">
                                                <h:outputText value="İlgili Kişi" />
                                            </f:facet>
                                            <h:outputText value="#{tedarikcilistesi.ilgiliKisi}" />
                                        </p:column>

                                        <p:column style="width:16px">
                                            <f:facet name="header">
                                                <h:outputText value="E-posta" />
                                            </f:facet>
                                            <h:outputText value="#{tedarikcilistesi.eposta}" />
                                        </p:column>
                                        
                                        <p:column style="width:16px">
                                            <f:facet name="header">
                                                <h:outputText value="Kullanıc Adı:" />
                                            </f:facet>
                                            <h:outputText value="#{tedarikcilistesi.kullaniciAdi}" />
                                        </p:column>


                                    </p:dataTable> 
                                </h:panelGrid>
                                <h:panelGrid id="satinalmaciGüncelle2" columns="2" cellpadding="4">  
                                    <p:commandButton value="Sil"  ajax="false" actionListener="#{satinalmacibean.silSatinAlmaci}" ></p:commandButton> 	
                                    <p:commandButton value="Güncelle"  ajax="false" actionListener="#{satinalmacibean.guncelleSatinAlmaci}" ></p:commandButton> 	

                                </h:panelGrid>  

                            </p:dialog>           
                            <p:messages/>


                        </div>
                        <!-- end #content -->
                    </h:form>
                    <div style="clear: both;">&nbsp;</div>
                </div>

                <!-- end #page -->

            </div>
            <div id="footer-bgcontent">
                <div id="footer" align="center">
                    <p>İHALE YÖNETİM SİSTEMİ - 2011</p>
                </div>
            </div>
            <!-- end #footer -->
        </div>

    </h:body>
</html>


